<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <script>
        // 有重复项的数组
        const arr = ['美女', '华为', '杰伦', '徐坤', '美女', '华为']

        // 一行代码实现去重
        const newArr = [...new Set(arr)]

        console.log(arr)
        console.log(newArr)
    </script>
</body>

</html>